package btrip

import (
	"sync"
)

// HotelDetailRoomDto 结构体
type HotelDetailRoomDto struct {
	// 详情报价列表
	Rates []HotelDetailRateDto `json:"rates,omitempty" xml:"rates>hotel_detail_rate_dto,omitempty"`
	// 面积
	Area string `json:"area,omitempty" xml:"area,omitempty"`
	// 床型
	BedTypeString string `json:"bed_type_string,omitempty" xml:"bed_type_string,omitempty"`
	// 设施
	Facility string `json:"facility,omitempty" xml:"facility,omitempty"`
	// 楼层
	Floor string `json:"floor,omitempty" xml:"floor,omitempty"`
	// 房间名称
	Name string `json:"name,omitempty" xml:"name,omitempty"`
	// 宽带服务，&#34;0&#34;,&#34;有线上网(免费),&#34;1&#34;,&#34;有线上网(无)&#34;,&#34;2&#34;,&#34;有线上网(收费)&#34;,&#34;3&#34;,&#34;有线上网(部分有且免费)&#34;,&#34;4&#34;,&#34;有线上网(部分有且收费)&#34;
	NetworkService string `json:"network_service,omitempty" xml:"network_service,omitempty"`
	// 图片
	Pics string `json:"pics,omitempty" xml:"pics,omitempty"`
	// 窗型
	WindowType string `json:"window_type,omitempty" xml:"window_type,omitempty"`
	// 最大入住人数
	MaxOccupancy int64 `json:"max_occupancy,omitempty" xml:"max_occupancy,omitempty"`
	// 房型ID
	Srid int64 `json:"srid,omitempty" xml:"srid,omitempty"`
	// 状态，状态0:正常;-1:删除
	Status int64 `json:"status,omitempty" xml:"status,omitempty"`
}

var poolHotelDetailRoomDto = sync.Pool{
	New: func() any {
		return new(HotelDetailRoomDto)
	},
}

// GetHotelDetailRoomDto() 从对象池中获取HotelDetailRoomDto
func GetHotelDetailRoomDto() *HotelDetailRoomDto {
	return poolHotelDetailRoomDto.Get().(*HotelDetailRoomDto)
}

// ReleaseHotelDetailRoomDto 释放HotelDetailRoomDto
func ReleaseHotelDetailRoomDto(v *HotelDetailRoomDto) {
	v.Rates = v.Rates[:0]
	v.Area = ""
	v.BedTypeString = ""
	v.Facility = ""
	v.Floor = ""
	v.Name = ""
	v.NetworkService = ""
	v.Pics = ""
	v.WindowType = ""
	v.MaxOccupancy = 0
	v.Srid = 0
	v.Status = 0
	poolHotelDetailRoomDto.Put(v)
}
